<template>
  <div class="header">
    <div class="header-left">
      <span class="iconfont icon-arrow-left-bold"></span>
    </div>
    <div class="header-input">
      <span class="iconfont icon-line_sousuo"></span>
      <input type="text" placeholder="输入城市/地点">
    </div>
    <router-link to="/city">
    <div class="header-right">
      <span>{{this.city}}</span>
      <div class="arrow-down"></div>
    </div>
    </router-link>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: "HomeHeader",
  computed:{
    ...mapState(['city'])
  }
};
</script>

<style lang="scss" scoped>
  @import '~styles/minin';
  .header{
    height: .86rem;
    line-height: .86rem;
    display: flex;
    background-color: $bc;
    color: #fff;
    .header-left{
      width: .44rem;
      float: left;
      margin-left: .2rem;
    }
    .header-input{
      flex: 1;
      background-color: #fff;
      border-radius: .1rem;
      margin-top:.12rem ;
      height: .64rem;
      line-height: .5rem;
      margin-left: .2rem;
      color: #ccc;
      padding-left: .2rem;
    }
    .header-right{
      min-width: 1.04;
      float: right;
      padding: 0 .1rem;
      text-align: center;
      color: #fff;
      .arrow-down{
        display: inline-block;
        width:0rem;
        height:0rem;
        border-left:0.12rem solid transparent;
        border-right:0.12rem solid transparent;
        border-top:0.12rem solid #fff;
        padding-bottom:.04rem ;
      }
    }
  }

</style>